package guowei.gulistorage.storage.dao;

import guowei.gulistorage.storage.entity.WareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品库存
 * 
 * @author guoguo
 * @email 1573746397@qq.com
 * @date 2023-05-21 12:24:20
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    Long getStockBySkuId(@Param("id") Long id);

    List<Long> selectWareIdsBySkuId(@Param("skuId") Long skuId);

    Integer lockSkuInWare(@Param("skuId") Long skuId,@Param("num") Integer num,@Param("wareId") Long wareId);
}
